package top.dancun.eascrawler.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.dancun.common.utils.PageUtils;
import top.dancun.common.utils.R;
import top.dancun.eascrawler.service.PapersPublishedService;

import java.util.Map;

@RestController
public class PapersPublishedController {
    @Autowired
    PapersPublishedService publishedService;

    @RequestMapping("/list")
    public R listPage(@RequestBody Map<String,Object> params){
        PageUtils pageUtils = publishedService.queryPage(params);
        return R.ok().put("data",pageUtils);
    }

    @RequestMapping("/echartdata")
    public R echartData(@RequestBody Map<String,Object> params){
       Map<String,Object> data = publishedService.echartsData(params);
        return R.ok().put("data",data);
    }
}
